#ifndef GSM_INTERFACE_H
#define GSM_INTERFACE_H

#ifdef WIN32
typedef signed short int16_t;
#else
#include <stdint.h>
#endif // WIN32

typedef struct GSMFR_encinst_t_ GSMFR_encinst_t;
typedef struct GSMFR_decinst_t_ GSMFR_decinst_t;

#ifdef __cplusplus
extern "C" {
#endif

int16_t WebRtcGSMFR_CreateEnc(GSMFR_encinst_t** inst);
int16_t WebRtcGSMFR_FreeEnc(GSMFR_encinst_t* inst);
int16_t WebRtcGSMFR_Encode(GSMFR_encinst_t* encInst, int16_t* input,
                           int16_t len, int16_t* output);
int16_t WebRtcGSMFR_EncoderInit(GSMFR_encinst_t* encInst, int16_t mode);

int16_t WebRtcGSMFR_CreateDec(GSMFR_decinst_t** inst);
int16_t WebRtcGSMFR_FreeDec(GSMFR_decinst_t* inst);
int16_t WebRtcGSMFR_Decode(GSMFR_decinst_t *GSMdec_inst,
								const int16_t *encoded,
								int16_t len,
								int16_t *decoded,
								int16_t *speechType);

int16_t WebRtcGSMFR_DecodeBwe(GSMFR_decinst_t* decInst, int16_t* input);
int16_t WebRtcGSMFR_DecodePlc(GSMFR_decinst_t* decInst);
int16_t WebRtcGSMFR_DecoderInit(GSMFR_decinst_t* decInst);

void WebRtcGSMFR_Version(char *versionStr, short len);
#ifdef __cplusplus
};
#endif
#endif

#ifndef GSM_INTERFACE_H
#define GSM_INTERFACE_H

#ifdef WIN32
typedef signed short int16_t;
#else
#include <stdint.h>
#endif // WIN32

typedef struct GSMFR_encinst_t_ GSMFR_encinst_t;
typedef struct GSMFR_decinst_t_ GSMFR_decinst_t;

#ifdef __cplusplus
extern "C" {
#endif

int16_t WebRtcGSMFR_CreateEnc(GSMFR_encinst_t** inst);
int16_t WebRtcGSMFR_FreeEnc(GSMFR_encinst_t* inst);
int16_t WebRtcGSMFR_Encode(GSMFR_encinst_t* encInst, int16_t* input,
                           int16_t len, int16_t* output);
int16_t WebRtcGSMFR_EncoderInit(GSMFR_encinst_t* encInst, int16_t mode);

int16_t WebRtcGSMFR_CreateDec(GSMFR_decinst_t** inst);
int16_t WebRtcGSMFR_FreeDec(GSMFR_decinst_t* inst);
int16_t WebRtcGSMFR_Decode(GSMFR_decinst_t *GSMdec_inst,
								const int16_t *encoded,
								int16_t len,
								int16_t *decoded,
								int16_t *speechType);

int16_t WebRtcGSMFR_DecodeBwe(GSMFR_decinst_t* decInst, int16_t* input);
int16_t WebRtcGSMFR_DecodePlc(GSMFR_decinst_t* decInst);
int16_t WebRtcGSMFR_DecoderInit(GSMFR_decinst_t* decInst);

void WebRtcGSMFR_Version(char *versionStr, short len);
#ifdef __cplusplus
};
#endif
#endif

#ifndef GSM_INTERFACE_H
#define GSM_INTERFACE_H

#ifdef WIN32
typedef signed short int16_t;
#else
#include <stdint.h>
#endif // WIN32

typedef struct GSMFR_encinst_t_ GSMFR_encinst_t;
typedef struct GSMFR_decinst_t_ GSMFR_decinst_t;

#ifdef __cplusplus
extern "C" {
#endif

int16_t WebRtcGSMFR_CreateEnc(GSMFR_encinst_t** inst);
int16_t WebRtcGSMFR_FreeEnc(GSMFR_encinst_t* inst);
int16_t WebRtcGSMFR_Encode(GSMFR_encinst_t* encInst, int16_t* input,
                           int16_t len, int16_t* output);
int16_t WebRtcGSMFR_EncoderInit(GSMFR_encinst_t* encInst, int16_t mode);

int16_t WebRtcGSMFR_CreateDec(GSMFR_decinst_t** inst);
int16_t WebRtcGSMFR_FreeDec(GSMFR_decinst_t* inst);
int16_t WebRtcGSMFR_Decode(GSMFR_decinst_t *GSMdec_inst,
								const int16_t *encoded,
								int16_t len,
								int16_t *decoded,
								int16_t *speechType);

int16_t WebRtcGSMFR_DecodeBwe(GSMFR_decinst_t* decInst, int16_t* input);
int16_t WebRtcGSMFR_DecodePlc(GSMFR_decinst_t* decInst);
int16_t WebRtcGSMFR_DecoderInit(GSMFR_decinst_t* decInst);

void WebRtcGSMFR_Version(char *versionStr, short len);
#ifdef __cplusplus
};
#endif
#endif

